.register-container {
  min-height: 100vh;
  background: linear-gradient(180deg, #f0f2f5 0%, #ffffff 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: env(safe-area-inset-bottom);

  .header {
    position: sticky;
    top: 0;
    width: 694rpx;
    padding: 60rpx 40rpx;
    background: #ffffff;
    border-radius: 0 0 30rpx 30rpx;
    box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
    margin-bottom: 30rpx;
    position: relative;
    overflow: hidden;

    &::after {
      content: '';
      position: absolute;
      right: -60rpx;
      top: -60rpx;
      width: 200rpx;
      height: 200rpx;
      background: linear-gradient(135deg, #3c9cff20 0%, transparent 100%);
      border-radius: 50%;
    }

    .title {
      font-size: 48rpx;
      font-weight: bold;
      color: #333333;
      display: block;
      margin-bottom: 12rpx;
      background: linear-gradient(90deg, #333333, #666666);
      -webkit-background-clip: text;
      color: transparent;
    }

    .subtitle {
      font-size: 26rpx;
      color: #999999;
      letter-spacing: 2rpx;
      text-transform: uppercase;
    }
  }

  .form-container {
    width: 694rpx;
    flex: 1;
    padding: 0 30rpx;
    box-sizing: border-box;
  }

  .form-section {
    background: #ffffff;
    border-radius: 24rpx;
    padding: 40rpx;
    margin-bottom: 30rpx;
    box-shadow: 0 8rpx 30rpx rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;

    &:hover {
      transform: translateY(-2rpx);
      box-shadow: 0 12rpx 40rpx rgba(0, 0, 0, 0.06);
    }

    .section-title {
      display: flex;
      align-items: center;
      margin-bottom: 40rpx;
      padding-bottom: 24rpx;
      border-bottom: 2rpx solid #f5f6fa;
      position: relative;

      &::after {
        content: '';
        position: absolute;
        bottom: -2rpx;
        left: 0;
        width: 60rpx;
        height: 4rpx;
        background: #3c9cff;
        border-radius: 4rpx;
      }

      text {
        font-size: 34rpx;
        font-weight: bold;
        color: #333333;
        margin-left: 16rpx;
      }
    }
  }

  .input-group {
    position: relative;
    margin-bottom: 32rpx;

    .label {
      font-size: 28rpx;
      color: #666666;
      margin-bottom: 16rpx;
      display: block;

      &.required::before {
        content: '*';
        color: #ff4d4f;
        margin-right: 4rpx;
      }
    }

    .error-tip {
      position: absolute;
      bottom: -28rpx;
      left: 0;
      font-size: 24rpx;
      color: #ff4d4f;
      transform: scale(0.9);
      transform-origin: left;
      white-space: nowrap;
      z-index: 1;
    }

    &:has(.error-tip) {
      margin-bottom: 44rpx;
    }

    :deep(.uv-input) {
      background: #f8f9fc;
      border-radius: 12rpx;
      padding: 4rpx 24rpx;
      margin-bottom: 4rpx;

      &:focus {
        background: #f0f7ff;
      }
    }
  }

  .address-picker {
    .location-btn {
      background: #f8f9fc;
      border-radius: 16rpx;
      padding: 24rpx;
      margin-bottom: 24rpx;
      transition: all 0.3s ease;

      &:active {
        background: #f0f7ff;
      }

      .btn-content {
        display: flex;
        align-items: center;
        justify-content: space-between;

        .left {
          display: flex;
          align-items: center;
          gap: 16rpx;
          flex: 1;

          .btn-text {
            font-size: 28rpx;
            color: #666666;
            flex: 1;
          }
        }
      }
    }

    .address-preview {
      background: #ffffff;
      border-radius: 16rpx;
      padding: 24rpx;
      margin-bottom: 24rpx;
      border: 2rpx solid #f0f0f0;

      .preview-item {
        display: flex;
        align-items: flex-start;
        margin-bottom: 16rpx;

        &:last-child {
          margin-bottom: 0;
        }

        .label {
          font-size: 26rpx;
          color: #909399;
          min-width: 120rpx;
        }

        .value {
          flex: 1;
          font-size: 26rpx;
          color: #333333;
          line-height: 1.5;
          padding-left: 16rpx;
        }
      }
    }

    .map-preview {
      width: 100%;
      height: 300rpx;
      border-radius: 16rpx;
      overflow: hidden;
      margin-top: 24rpx;
      box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
    }
  }

  .map-container {
    height: 240rpx;
    background: #f8f9fc;
    border-radius: 16rpx;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 32rpx;
    border: 2rpx dashed #dcdfe6;
    transition: all 0.3s ease;

    &:active {
      background: #f0f7ff;
      border-color: #3c9cff;
    }

    .map-tip {
      font-size: 28rpx;
      color: #909399;
      margin-bottom: 20rpx;
    }
  }

  .upload-section {
    margin-top: 32rpx;

    .label {
      font-size: 28rpx;
      color: #666666;
      margin-bottom: 20rpx;
      display: block;
    }
  }

  .footer {
    width: 694rpx;
    padding: 30rpx 40rpx;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.05);
    border-radius: 30rpx 30rpx 0 0;
    margin-top: 40rpx;

    .submit-btn {
      background: linear-gradient(90deg, #3c9cff, #5dabff);
      color: #ffffff;
      height: 88rpx;
      line-height: 88rpx;
      border-radius: 44rpx;
      font-size: 32rpx;
      font-weight: 500;
      letter-spacing: 2rpx;
      transition: all 0.3s ease;

      &:active {
        transform: scale(0.98);
      }

      &:disabled {
        background: linear-gradient(90deg, #cccccc, #dddddd);
        cursor: not-allowed;
      }
    }
  }
}

// 暗色模式适配
@media (prefers-color-scheme: dark) {
  .address-picker {
    .location-btn {
      background: #363636;

      &:active {
        background: #404040;
      }

      .btn-text {
        color: #e0e0e0;
      }
    }

    .address-preview {
      background: #2c2c2c;
      border-color: #404040;

      .preview-item {
        .label {
          color: #909399;
        }

        .value {
          color: #e0e0e0;
        }
      }
    }
  }
}


.address-tip {
  font-size: 28rpx;
  color: #666666;
  margin-bottom: 16rpx;
  display: block;

  &.required::before {
    content: '*';
    color: #ff4d4f;
    margin-right: 4rpx;
  }
}

.submit-btn {
  &.loading {
    opacity: 0.7;
    background: #cccccc;

    &::after {
      content: '';
      display: inline-block;
      width: 36rpx;
      height: 36rpx;
      margin-left: 12rpx;
      border: 4rpx solid #ffffff;
      border-top-color: transparent;
      border-radius: 50%;
      animation: btn-loading 0.8s infinite linear;
    }
  }
}

@keyframes btn-loading {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

// 错误提示样式
.error-message {
  font-size: 24rpx;
  color: #ff4d4f;
  margin-top: 8rpx;
}

.input-group {
  position: relative;
  margin-bottom: 32rpx;

  .label {
    font-size: 28rpx;
    color: #666666;
    margin-bottom: 16rpx;
    display: block;

    &.required::before {
      content: '*';
      color: #ff4d4f;
      margin-right: 4rpx;
    }
  }

  .error-tip {
    position: absolute;
    bottom: -28rpx;
    left: 0;
    font-size: 24rpx;
    color: #ff4d4f;
    transform: scale(0.9);
    transform-origin: left;
    white-space: nowrap;
    z-index: 1;
  }
}

// 输入框激活状态
:deep(.uv-input) {
  &.is-focus {
    background: #f0f7ff !important;

    .uv-input__input {
      caret-color: #3c9cff;
    }
  }

  &.is-error {
    background: #fff2f0 !important;

    .uv-input__input {
      caret-color: #ff4d4f;
    }
  }
}

.upload-section {
  margin-top: 24rpx;
  
  .label {
    display: block;
    font-size: 28rpx;
    color: #666;
    margin-bottom: 16rpx;
  }
  
  .upload-area {
    width: 200rpx;
    height: 200rpx;
    background: #f0f7ff;
    border: 2rpx dashed #3c9cff;
    border-radius: 12rpx;
    overflow: hidden;
    transition: all 0.3s ease;
    
    &:active {
      background: #e5f1ff;
      transform: scale(0.98);
    }
    
    .upload-button {
      width: 100%;
      height: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 12rpx;
      
      text {
        font-size: 24rpx;
        color: #666;
      }
    }
  }
  
  .preview-area {
    position: relative;
    width: 200rpx;
    height: 200rpx;
    border-radius: 12rpx;
    overflow: hidden;
    box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
    
    .preview-image {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    
    .delete-btn {
      position: absolute;
      top: 8rpx;
      right: 8rpx;
      width: 40rpx;
      height: 40rpx;
      background: rgba(0, 0, 0, 0.5);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 2;
      
      &:active {
        background: rgba(0, 0, 0, 0.7);
      }
    }
    
    .preview-mask {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.3);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 8rpx;
      opacity: 0;
      transition: opacity 0.3s ease;
      
      text {
        font-size: 24rpx;
        color: #fff;
      }
      
      &:active {
        opacity: 1;
      }
    }
  }
}

.form-section {
  padding-bottom: 20rpx;
  
  &:last-child {
    margin-bottom: 40rpx;
  }
}